package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataScope;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DevicesMsgMapper;
import com.ruoyi.system.domain.DevicesMsg;
import com.ruoyi.system.service.IDevicesMsgService;

/**
 * 设备数据Service业务层处理
 * 
 * @author zyy
 * @date 2025-12-02
 */
@Service
public class DevicesMsgServiceImpl implements IDevicesMsgService 
{
    @Autowired
    private DevicesMsgMapper devicesMsgMapper;

    /**
     * 查询设备数据
     * 
     * @param id 设备数据主键
     * @return 设备数据
     */
    @Override
    public DevicesMsg selectDevicesMsgById(Long id)
    {
        return devicesMsgMapper.selectDevicesMsgById(id);
    }

    /**
     * 查询设备数据列表
     * 
     * @param devicesMsg 设备数据
     * @return 设备数据
     */
    @Override
    @DataScope(deptAlias = "d",userAlias = "u")
    public List<DevicesMsg> selectDevicesMsgList(DevicesMsg devicesMsg)
    {
        return devicesMsgMapper.selectDevicesMsgList(devicesMsg);
    }

    /**
     * 新增设备数据
     * 
     * @param devicesMsg 设备数据
     * @return 结果
     */
    @Override
    public int insertDevicesMsg(DevicesMsg devicesMsg)
    {
        return devicesMsgMapper.insertDevicesMsg(devicesMsg);
    }

    /**
     * 修改设备数据
     * 
     * @param devicesMsg 设备数据
     * @return 结果
     */
    @Override
    public int updateDevicesMsg(DevicesMsg devicesMsg)
    {
        return devicesMsgMapper.updateDevicesMsg(devicesMsg);
    }

    /**
     * 批量删除设备数据
     * 
     * @param ids 需要删除的设备数据主键
     * @return 结果
     */
    @Override
    public int deleteDevicesMsgByIds(Long[] ids)
    {
        return devicesMsgMapper.deleteDevicesMsgByIds(ids);
    }

    /**
     * 删除设备数据信息
     * 
     * @param id 设备数据主键
     * @return 结果
     */
    @Override
    public int deleteDevicesMsgById(Long id)
    {
        return devicesMsgMapper.deleteDevicesMsgById(id);
    }
}
